/*
* @Author: wanghongfucoder
* @Date:   2017-03-09 10:17:46
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-03-09 10:20:15
*/

import java.util.ArrayList;
import java.util.List;

public class Broker {
	private ArrayList<Order> list = new ArrayList<Order>();

	public void takeOrder(Order order){
		list.add(order);
	}

	public void placeOrders(){
		for (Order order : list) {
			order.execute();
		}
		list.clear();
	}
}